﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class OldTruck_open : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            SqlConnection strcon = Class1.DBconnection();
            strcon.Open();
            SqlDataAdapter sda = new SqlDataAdapter("select * from tb_OldTruck where id=" + Request.QueryString["id"], strcon);
            DataSet ds = new DataSet();
            sda.Fill(ds, "tb_OldTruck");
            DataRowView rowview = ds.Tables["tb_OldTruck"].DefaultView[0];
            LBLType.Text = rowview["Type"].ToString();            
            LBLTruckName.Text = rowview["TruckName"].ToString();
            LBLTruckSize.Text = rowview["TruckSize"].ToString();
            LBLStartDate.Text = rowview["StartDate"].ToString();
            LBLRideNumber.Text = rowview["RideNumber"].ToString();
            LBLTruckLicense.Text = rowview["TruckLicense"].ToString();
            LBLMaxWeight.Text = rowview["MaxWeight"].ToString();
            LBLEffectDate.Text = rowview["EffectDate"].ToString();
            LBLColor.Text = rowview["Color"].ToString();
            LBLTruckNumber.Text = rowview["TruckNumber"].ToString();
            LBLArea.Text = rowview["Area"].ToString();
            LBLTruckManage.Text = rowview["TruckManage"].ToString();
            LBLPrice.Text = rowview["Price"].ToString();
            LBLOld.Text = rowview["Old"].ToString();
            LBLLinkman.Text = rowview["Linkman"].ToString();
            LBLTel.Text = rowview["Tel"].ToString();
            LBLSendNow.Text = rowview["SendNow"].ToString();
            LBLBewrite.Text = rowview["Bewrite"].ToString();
            ds.Clear();
            strcon.Close();
        } 
    }
}
